<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">


    <ui:composition template="../../master.xhtml">

    <ui:define name="menu">
            <ui:include src="../menu.xhtml" /> 
        </ui:define>
        
        
        <ui:define name="TituloModulo">

            Gestão de Utilizadores
        </ui:define>

        <ui:define name="TituloConteudoPrincipal">
            Alterar Grupo
        </ui:define>


        <ui:define name="ConteudoPrincipal">

            <p:messages globalOnly="true"/>
            <h:form>
                <h:panelGrid columns="3">
                    <h:outputLabel value="#{bundle01.designacao}" for="designacao" />
                    <p:inputText id="designacao" value="#{tipoUsuarioController.selected.designacao}" title="#{bundle01.designacao}" required="true" requiredMessage="#{bundle01.obrigatorio}"/>
                    <p:message for="designacao" />
                    <h:outputLabel value="#{bundle01.descricao}" for="descricao" />
                    <p:inputTextarea id="descricao" value="#{tipoUsuarioController.selected.descricao}" title="#{bundle01.descricao}" />
                    <p:message for="descricao" />
                    <h:outputLabel value="#{bundle01.permissoes}" for="permissoes" />
                    <p:selectCheckboxMenu  id="permissoes" value="#{tipoUsuarioController.listaPermissao}" label="Permissões" >  
                        <f:selectItems value="#{permissaoUsuarioController.itemsAvailableSelectMany}"  />  
                    </p:selectCheckboxMenu>  
                </h:panelGrid>
                <p:commandButton ajax="false" action="#{tipoUsuarioController.update}" value="#{bundle01.salvar}"/>
                <p:commandButton ajax="false" action="View" value="#{bundle01.ver}" immediate="true"/>
                <p:commandButton ajax="false" action="#{tipoUsuarioController.prepareList}" value="#{bundle01.listar}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
